
//FOR REGIONAL STUDY


//start by loading RegionClean.csv

//encode factor variables
encode dep2, gen(dep_enc)
encode region, gen(reg_enc)


// TABLE 1 - DESCRIPTIVE STATISTICS

//experimental variables
tabstat bribe correct_guesses donate25, statistics(mean sd min max count) columns(statistics) format(%4.2f)

//nonexperimental variables
tabstat bribe_nonexp_dich psm job_intrinsic job_extrinsic job_pragmatic, statistics(mean sd min max count) columns(statistics) format(%4.2f)

//dependent variables
tabstat job_sect pub_avg fed_pref reg_pref gov_pref priv_avg corp_pref owner_pref sme_pref consult_pref finance_pref ngo_pref, statistics(mean sd min max count) columns(statistics) format(%4.2f)


// REGRESSIONS FOR TABLES 4 & 5 
// run these first; code for tables is below

global controls_region male risk_averse1 rel_pubsect gpa family_income i.class_yr i.dep_enc i.reg_enc


//career preferences regressed on bribe

eststo clear
foreach var in pub_avg job_sect fed_pref reg_pref gov_pref ngo_pref priv_avg finance_pref corp_pref consult_pref owner_pref sme_pref {  
   reg `var' bribe, robust
   estimates store `var'_bribe1_R
   }
   

eststo clear
foreach var in pub_avg job_sect fed_pref reg_pref gov_pref ngo_pref priv_avg finance_pref corp_pref consult_pref owner_pref sme_pref {  
   reg `var' bribe $controls_region, robust
   estimates store `var'_bribe2_R
   }
     

// career preferences regressed on cheating


eststo clear
foreach var in pub_avg job_sect fed_pref reg_pref gov_pref ngo_pref priv_avg finance_pref corp_pref consult_pref owner_pref sme_pref {  
   reg `var' correct_guesses, robust
   estimates store `var'_cheat1_R
   }
   
eststo clear
foreach var in pub_avg job_sect fed_pref reg_pref gov_pref ngo_pref priv_avg finance_pref corp_pref consult_pref owner_pref sme_pref {  
   reg `var' correct_guesses $controls_region, robust
   estimates store `var'_cheat2_R
   }
   
// career preferences regressed on donations

eststo clear
foreach var in pub_avg job_sect fed_pref reg_pref gov_pref ngo_pref priv_avg finance_pref corp_pref consult_pref owner_pref sme_pref {  
   reg `var' donate, robust
   estimates store `var'_donate1_R
   }
   
eststo clear
foreach var in pub_avg job_sect fed_pref reg_pref gov_pref ngo_pref priv_avg finance_pref corp_pref consult_pref owner_pref sme_pref {  
   reg `var' donate $controls_region, robust
   estimates store `var'_donate2_R
   }
   
//career preferences regressed on bribe justifiable
   
eststo clear
foreach var in pub_avg job_sect fed_pref reg_pref gov_pref ngo_pref priv_avg finance_pref corp_pref consult_pref owner_pref sme_pref {  
   reg `var' bribe_nonexp_dich, robust
   estimates store `var'_bribe_just1_R
   }
   
eststo clear
foreach var in pub_avg job_sect fed_pref reg_pref gov_pref ngo_pref priv_avg finance_pref corp_pref consult_pref owner_pref sme_pref {  
   reg `var' bribe_nonexp_dich $controls_region, robust
   estimates store `var'_bribe_just2_R
   }
   
//career preferences regressed on psm
   
eststo clear
foreach var in pub_avg job_sect fed_pref reg_pref gov_pref ngo_pref priv_avg finance_pref corp_pref consult_pref owner_pref sme_pref {  
   reg `var' psm, robust
   estimates store `var'_psm1_R
   }
   
eststo clear
foreach var in pub_avg job_sect fed_pref reg_pref gov_pref ngo_pref priv_avg finance_pref corp_pref consult_pref owner_pref sme_pref {  
   reg `var' psm $controls_region, robust
   estimates store `var'_psm2_R
   }
   
//career preferences regressed on job intrinsic
   
eststo clear
foreach var in pub_avg job_sect fed_pref reg_pref gov_pref ngo_pref priv_avg finance_pref corp_pref consult_pref owner_pref sme_pref {  
   reg `var' job_intrinsic, robust
   estimates store `var'_intrinsic1_R
   }
   
eststo clear
foreach var in pub_avg job_sect fed_pref reg_pref gov_pref ngo_pref priv_avg finance_pref corp_pref consult_pref owner_pref sme_pref {  
   reg `var' job_intrinsic $controls_region, robust
   estimates store `var'_intrinsic2_R
   }
   
//career preferences regressed on job extrinsic
   
eststo clear
foreach var in pub_avg job_sect fed_pref reg_pref gov_pref ngo_pref priv_avg finance_pref corp_pref consult_pref owner_pref sme_pref {  
   reg `var' job_extrinsic, robust
   estimates store `var'_extrinsic1_R
   }
   
eststo clear
foreach var in pub_avg job_sect fed_pref reg_pref gov_pref ngo_pref priv_avg finance_pref corp_pref consult_pref owner_pref sme_pref {  
   reg `var' job_extrinsic $controls_region, robust
   estimates store `var'_extrinsic2_R
   }
   
 
//TABLE 4


// Panel A - I

esttab pub_avg_bribe1_R pub_avg_bribe2_R job_sect_bribe1_R job_sect_bribe2_R fed_pref_bribe1_R fed_pref_bribe2_R reg_pref_bribe1_R reg_pref_bribe2_R gov_pref_bribe1_R gov_pref_bribe2_R ngo_pref_bribe1_R ngo_pref_bribe2_R, ///
se(3) b(3) r2 nogaps star(+ 0.10 * 0.05 ** 0.01 *** 0.001)keep (bribe) compress unstack replace label ///
collabels("") nonumbers starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001)  mtitles( "Pub Index" "Pub Index" "Binary" "Binary" "Federal" "Federal" "Regional" "Regional" "Budget Sector" "Budget Sector" "Non-Profit" "Non-Profit") /// 
varlabels(bribe "Gave/Accepted Bribe") ///
mgroups("Aggregated Indicators" "Disaggregated Indicators", pattern(1 0 0 0 1 0 0 0 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}))

// Panel A - II

esttab pub_avg_cheat1_R pub_avg_cheat2_R job_sect_cheat1_R job_sect_cheat2_R fed_pref_cheat1_R fed_pref_cheat2_R reg_pref_cheat1_R reg_pref_cheat2_R gov_pref_cheat1_R gov_pref_cheat2_R ngo_pref_cheat1_R ngo_pref_cheat2_R, ///
se(3) b(3) r2 nogaps star(+ 0.10 * 0.05 ** 0.01 *** 0.001)keep (correct_guesses) compress unstack replace label ///
collabels("") nonumbers starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001)  mtitles("Pub Index" "Pub Index"  "Binary" "Binary" "Federal" "Federal" "Regional" "Regional" "Budget Sector" "Budget Sector" "Non-Profit" "Non-Profit") /// 
varlabels(correct_guesses "Correct Guesses") ///
mgroups("Aggregated Indicators" "Disaggregated Indicators", pattern(1 0 0 0 1 0 0 0 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}))

// Panel A - III

esttab pub_avg_donate1_R pub_avg_donate2_R job_sect_donate1_R job_sect_donate2_R fed_pref_donate1_R fed_pref_donate2_R reg_pref_donate1_R reg_pref_donate2_R gov_pref_donate1_R gov_pref_donate2_R ngo_pref_donate1_R ngo_pref_donate2_R, ///
se(3) b(3) r2 nogaps star(+ 0.10 * 0.05 ** 0.01 *** 0.001)keep (donate) compress unstack replace label ///
collabels("") nonumbers starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001)  mtitles("Pub Index" "Pub Index" "Binary" "Binary" "Federal" "Federal" "Regional" "Regional" "Budget Sector" "Budget Sector" "Non-Profit" "Non-Profit") /// 
varlabels(correct_guesses "Donate") ///
mgroups("Aggregated Indicators" "Disaggregated Indicators", pattern(1 0 0 0 1 0 0 0 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}))


// Panel B - I

esttab priv_avg_bribe1_R priv_avg_bribe2_R finance_pref_bribe1_R finance_pref_bribe2_R corp_pref_bribe1_R corp_pref_bribe2_R consult_pref_bribe1_R consult_pref_bribe2_R owner_pref_bribe1_R owner_pref_bribe2_R sme_pref_bribe1_R sme_pref_bribe2_R, ///
se(3) b(3) r2 nogaps star(+ 0.10 * 0.05 ** 0.01 *** 0.001)keep (bribe) compress unstack replace label ///
collabels("") nonumbers starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001)  mtitles("Priv Index" "Priv Index" "Finance" "Finance" "Corporate" "Corporate" "Consulting" "Consulting" "Business Owner" "Business Owner" "Small Business" "Small Business") /// 
varlabels(bribe "Gave/Accepted Bribe") ///
mgroups("Aggregated Indicators" "Disaggregated Indicators", pattern(1 0 1 0 0 0 0 0 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}))

// Panel B - II

esttab priv_avg_cheat1_R priv_avg_cheat2_R finance_pref_cheat1_R finance_pref_cheat2_R corp_pref_cheat1_R corp_pref_cheat2_R consult_pref_cheat1_R consult_pref_cheat2_R owner_pref_cheat1_R owner_pref_cheat2_R sme_pref_cheat1_R sme_pref_cheat2_R, ///
se(3) b(3) r2 nogaps star(+ 0.10 * 0.05 ** 0.01 *** 0.001)keep (correct_guesses) compress unstack replace label ///
collabels("") nonumbers starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001)  mtitles("Priv Index" "Priv Index" "Finance" "Finance" "Corporate" "Corporate" "Consulting" "Consulting" "Business Owner" "Business Owner" "Small Business" "Small Business") /// 
varlabels(correct_guesses "Correct Guesses") ///
mgroups("Aggregated Indicators" "Disaggregated Indicators", pattern(1 0 1 0 0 0 0 0 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}))

// Panel B - III

esttab priv_avg_donate1_R priv_avg_donate2_R finance_pref_donate1_R finance_pref_donate2_R corp_pref_donate1_R corp_pref_donate2_R consult_pref_donate1_R consult_pref_donate2_R owner_pref_donate1_R owner_pref_donate2_R sme_pref_donate1_R sme_pref_donate2_R, ///
se(3) b(3) r2 nogaps star(+ 0.10 * 0.05 ** 0.01 *** 0.001)keep (donate) compress unstack replace label ///
collabels("") nonumbers starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001)  mtitles("Priv Index" "Priv Index" "Finance" "Finance" "Corporate" "Corporate" "Consulting" "Consulting" "Business Owner" "Business Owner" "Small Business" "Small Business") /// 
varlabels(correct_guesses "Donate") ///
mgroups("Aggregated Indicators" "Disaggregated Indicators", pattern(1 0 1 0 0 0 0 0 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}))



// TABLE 5

// Panel A - I

esttab pub_avg_bribe_just1_R pub_avg_bribe_just2_R job_sect_bribe_just1_R job_sect_bribe_just2_R fed_pref_bribe_just1_R fed_pref_bribe_just2_R reg_pref_bribe_just1_R reg_pref_bribe_just2_R gov_pref_bribe_just1_R gov_pref_bribe_just2_R ngo_pref_bribe_just1_R ngo_pref_bribe_just2_R, ///
se(3) b(3) r2 nogaps star(+ 0.10 * 0.05 ** 0.01 *** 0.001)keep (bribe_nonexp_dich) compress unstack replace label ///
collabels("") nonumbers starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001)  mtitles("Pub Index" "Pub Index" "Binary" "Binary" "Federal" "Federal" "Regional" "Regional" "Budget Sector" "Budget Sector" "Non-Profit" "Non-Profit") /// 
varlabels(bribe_justify2 "Bribe Justifiable") ///
mgroups("Aggregated Indicators" "Disaggregated Indicators", pattern(1 0 0 0 1 0 0 0 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}))

// Panel A - II

esttab pub_avg_psm1_R pub_avg_psm2_R job_sect_psm1_R job_sect_psm2_R fed_pref_psm1_R fed_pref_psm2_R reg_pref_psm1_R reg_pref_psm2_R gov_pref_psm1_R gov_pref_psm2_R ngo_pref_psm1_R ngo_pref_psm2_R, ///
se(3) b(3) r2 nogaps star(+ 0.10 * 0.05 ** 0.01 *** 0.001) keep (psm) compress unstack replace label ///
collabels("") nonumbers starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001)  mtitles("Pub Index" "Pub Index" "Binary" "Binary" "Federal" "Federal" "Regional" "Regional" "Budget Sector" "Budget Sector" "Non-Profit" "Non-Profit") /// 
varlabels(psm "PSM") ///
mgroups("Aggregated Indicators" "Disaggregated Indicators", pattern(1 0 0 0 1 0 0 0 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}))

// Panel A - III

esttab pub_avg_intrinsic1_R pub_avg_intrinsic2_R job_sect_intrinsic1_R job_sect_intrinsic2_R fed_pref_intrinsic1_R fed_pref_intrinsic2_R reg_pref_intrinsic1_R reg_pref_intrinsic2_R gov_pref_intrinsic1_R gov_pref_intrinsic2_R ngo_pref_intrinsic1_R ngo_pref_intrinsic2_R, ///
se(3) b(3) r2 nogaps star(+ 0.10 * 0.05 ** 0.01 *** 0.001) keep (job_intrinsic) compress unstack replace label ///
collabels("") nonumbers starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001)  mtitles("Pub Index" "Pub Index" "Binary" "Binary" "Federal" "Federal" "Regional" "Regional" "Budget Sector" "Budget Sector" "Non-Profit" "Non-Profit") /// 
varlabels(job_intrinsic "Intrinsic") ///
mgroups("Aggregated Indicators" "Disaggregated Indicators", pattern(1 0 0 0 1 0 0 0 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}))

// Panel A - IV

esttab pub_avg_extrinsic1_R pub_avg_extrinsic2_R job_sect_extrinsic1_R job_sect_extrinsic2_R fed_pref_extrinsic1_R fed_pref_extrinsic2_R reg_pref_extrinsic1_R reg_pref_extrinsic2_R gov_pref_extrinsic1_R gov_pref_extrinsic2_R ngo_pref_extrinsic1_R ngo_pref_extrinsic2_R, ///
se(3) b(3) r2 nogaps star(+ 0.10 * 0.05 ** 0.01 *** 0.001) keep (job_extrinsic) compress unstack replace label ///
collabels("") nonumbers starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001)  mtitles("Pub Index" "Pub Index" "Binary" "Binary" "Federal" "Federal" "Regional" "Regional" "Budget Sector" "Budget Sector" "Non-Profit" "Non-Profit") /// 
varlabels(job_extrinsic "Extrinsic") ///
mgroups("Aggregated Indicators" "Disaggregated Indicators", pattern(1 0 0 0 1 0 0 0 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}))


// Panel B - I

esttab priv_avg_bribe_just1_R priv_avg_bribe_just2_R finance_pref_bribe_just1_R finance_pref_bribe_just2_R corp_pref_bribe_just1_R corp_pref_bribe_just2_R consult_pref_bribe_just1_R consult_pref_bribe_just2_R owner_pref_bribe_just1_R owner_pref_bribe_just2_R sme_pref_bribe_just1_R sme_pref_bribe_just2_R, ///
se(3) b(3) r2 nogaps star(+ 0.10 * 0.05 ** 0.01 *** 0.001) keep (bribe_nonexp_dich) compress unstack replace label ///
collabels("") nonumbers starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001)  mtitles("Priv Index" "Priv Index" "Finance" "Finance" "Corporate" "Corporate" "Consulting" "Consulting" "Business Owner" "Business Owner" "Small Business" "Small Business") /// 
varlabels(bribe_justify2 "Bribe Justifiable") ///
mgroups("Aggregated Indicators" "Disaggregated Indicators", pattern(1 0 1 0 0 0 0 0 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}))


// Panel B - II

esttab priv_avg_psm1_R priv_avg_psm2_R finance_pref_psm1_R finance_pref_psm2_R corp_pref_psm1_R corp_pref_psm2_R consult_pref_psm1_R consult_pref_psm2_R owner_pref_psm1_R owner_pref_psm2_R sme_pref_psm1_R sme_pref_psm2_R, ///
se(3) b(3) r2 nogaps star(+ 0.10 * 0.05 ** 0.01 *** 0.001) keep (psm) compress unstack replace label ///
collabels("") nonumbers starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001)  mtitles("Priv Index" "Priv Index" "Finance" "Finance" "Corporate" "Corporate" "Consulting" "Consulting" "Business Owner" "Business Owner" "Small Business" "Small Business") /// 
varlabels(psm "PSM") ///
mgroups("Aggregated Indicators" "Disaggregated Indicators", pattern(1 0 1 0 0 0 0 0 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}))

// Panel B - III

esttab priv_avg_intrinsic1_R priv_avg_intrinsic2_R finance_pref_intrinsic1_R finance_pref_intrinsic2_R corp_pref_intrinsic1_R corp_pref_intrinsic2_R consult_pref_intrinsic1_R consult_pref_intrinsic2_R owner_pref_intrinsic1_R owner_pref_intrinsic2_R sme_pref_intrinsic1_R sme_pref_intrinsic2_R, ///
se(3) b(3) r2 nogaps star(+ 0.10 * 0.05 ** 0.01 *** 0.001) keep (job_intrinsic) compress unstack replace label ///
collabels("") nonumbers starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001)  mtitles("Priv Index" "Priv Index" "Finance" "Finance" "Corporate" "Corporate" "Consulting" "Consulting" "Business Owner" "Business Owner" "Small Business" "Small Business") /// 
varlabels(job_intrinsic "Intrinsic") ///
mgroups("Aggregated Indicators" "Disaggregated Indicators", pattern(1 0 1 0 0 0 0 0 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}))


// Panel B - IV

esttab priv_avg_extrinsic1_R priv_avg_extrinsic2_R finance_pref_extrinsic1_R finance_pref_extrinsic2_R corp_pref_extrinsic1_R corp_pref_extrinsic2_R consult_pref_extrinsic1_R consult_pref_extrinsic2_R owner_pref_extrinsic1_R owner_pref_extrinsic2_R sme_pref_extrinsic1_R sme_pref_extrinsic2_R, ///
se(3) b(3) r2 nogaps star(+ 0.10 * 0.05 ** 0.01 *** 0.001) keep (job_extrinsic) compress unstack replace label ///
collabels("") nonumbers starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001)  mtitles("Priv Index" "Priv Index" "Finance" "Finance" "Corporate" "Corporate" "Consulting" "Consulting" "Business Owner" "Business Owner" "Small Business" "Small Business") /// 
varlabels(job_extrinsic "Extrinsic") ///
mgroups("Aggregated Indicators" "Disaggregated Indicators", pattern(1 0 1 0 0 0 0 0 0 0 0 0) span prefix(\multicolumn{@span}{c}{) suffix(}))


